package com.klf.system.bo;

import java.util.List;

import com.klf.po.SysRoles;
import com.klf.system.dao.SysRolesDAOImpl;

public class SysRolesBoImpl implements ISysRolesBo {
	
	@SuppressWarnings("unused")
	private SysRolesDAOImpl sysRolesDAOImpl;
	


	public SysRolesDAOImpl getSysRolesDAOImpl() {
		return sysRolesDAOImpl;
	}

	public void setSysRolesDAOImpl(SysRolesDAOImpl sysRolesDAOImpl) {
		this.sysRolesDAOImpl = sysRolesDAOImpl;
	}

	public void add(Object obj){
		// TODO Auto-generated method stub
		try {
			SysRoles c = (SysRoles)obj;
			sysRolesDAOImpl.add(c);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public void delete(Long[] id) {
		// TODO Auto-generated method stub
		try {
			sysRolesDAOImpl.deleteByIds(SysRoles.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public void delete(Long id) {
		// TODO Auto-generated method stub
		try {
			sysRolesDAOImpl.deleteById(SysRoles.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public List<SysRoles> getAll(String className) {
		// TODO Auto-generated method stub
		try {
			List list = sysRolesDAOImpl.getAll(className);
			List<SysRoles> ls = list;
			return ls;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public Object getObjectById(Long id) {
		// TODO Auto-generated method stub
		try {
			return sysRolesDAOImpl.getObjectById(SysRoles.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public void update(Object obj) {
		// TODO Auto-generated method stub
		try {
			sysRolesDAOImpl.update(obj);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	

}
